/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pstrres.hpp - String Resource structure definitions.
//
// Author: Kenneth G. Maxwell
//
// Copyright (c) 1997-2004 Swell Software 
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
// String Resources are an optional feature that allows an application to
// dynamically install new string tables and new fonts. This can be used
// to field-upgrade an application with new language support.
//
// This is an advanced feature and is NOT REQUIRED for most systems.
//
// This feature is enabled by defining the PEG_RUNTIME_STRING_RESOURCES
// configuration flag. If this is enabled, PEG_FILE_CLASS must 
// also be defined.
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _STRING_RES_HEADER_
#define _STRING_RES_HEADER_

#if defined(PEG_RUNTIME_STRING_RESOURCES)

/*--------------------------------------------------------------------------*/
// Binary String Resource header
/*--------------------------------------------------------------------------*/

#define STRING_RES_TAG    0x5352          // "SR"
#define STRING_RES_FORMAT_VERSION 0x0100  // 01.00

#define STRING_RES_NAME_LENGTH   40       // DON'T CHANGE THIS!

struct StringResHeader {
    PEGUSHORT Tag;
    PEGUSHORT FormatVersion;
    PEGUSHORT NumLanguages;
    PEGUSHORT NumStringIds;
    PEGUSHORT NumFonts;
    PEGUSHORT Spare1;
    PEGUSHORT Spare2[12];
    PEGULONG  Spare3[11];
    PEGULONG  Crc;
    char      UserString[120];
};

struct StringResLanguage {
    PEGUSHORT Tag;
    char LanguageName[STRING_RES_NAME_LENGTH];
    PEGUSHORT LanguageIndex;
    PEGUSHORT Crc;
    PEGLONG   StringDataSize;
};

struct StringResFont {
    PEGUSHORT Tag;
    PEGUSHORT NumPages;
    PEGUSHORT FontId;
    PEGUSHORT Spare;
    PEGLONG   TotalDataSize;
    char      FontName[STRING_RES_NAME_LENGTH];
};

#endif      // PEG_RUNTIME_STRING_RESOURCES

#endif      // sentry



